#ifndef PNG2ICO_WINDOW_H_
#define PNG2ICO_WINDOW_H_

#include <gtkmm.h>

class Png2IcoWindow : public Gtk::Window
{
 public:
  Png2IcoWindow();
  virtual ~Png2IcoWindow();

 protected:
  // signal handlers
  void on_menu_file_quit ();
  void on_menu_edit_options ();
  void on_dir_browse_button_clicked();
  void on_output_browse_button_clicked();
  void on_convert_button_clicked ();
  bool on_focus_out_event (GdkEventFocus* event);
  void on_menu_help_about ();

  // Tree model columns
  class ModelColumns : public Gtk::TreeModel::ColumnRecord
    {
    public:

      ModelColumns()
        { add(col_use); add(col_filename); }

      Gtk::TreeModelColumn<bool> col_use;
      Gtk::TreeModelColumn<Glib::ustring> col_filename;
    };

  ModelColumns columns_;

  typedef enum { PNG_DIR = 0, OUTPUT_DIR } DIRECTORY_TYPE;

  // widgets
  Gtk::Button dirBrowseBtn_, outputBrowseBtn_, convertBtn_;
  Gtk::VBox vBox_, treeVBox_;
  Gtk::Label dirLbl_, outputLbl_, filenameLbl_;
  Gtk::Entry dirEntry_, outputEntry_, filenameEntry_;
  Gtk::ScrolledWindow scrolledWindow_;
  Gtk::TreeView treeView_;
  Glib::RefPtr<Gtk::ListStore> refTreeModel_;
  Gtk::HButtonBox buttonBox_;
  Glib::RefPtr<Gtk::ActionGroup> refActionGroup_;
  Glib::RefPtr<Gtk::UIManager> refUIManager_;
  Gtk::Table table_;

 private:
  void doBrowseFolder (DIRECTORY_TYPE dirType);

};

#endif // PNG2ICO_WINDOW_H_
